/**
 * 
 */
package com.google.code.cisx.wfe.events;

import com.google.code.cisx.wfe.model.Case;

/**
 * @author <a href='mailto:rthakur@bravurasolutions.com'>Rahul Thakur</a>
 * @since 1.0
 * @version $Id$
 */
public class CaseEvent extends TypedEvent<Case> {

    public enum CaseEventType implements EventType {

        /**
         * Implies that the CaseImpl has been submitted with the workflow engine but
         * hasn't been opened yet.
         */
        CASE_SUBMITTED("CaseImpl Submitted"),

        /**
         * Implies that the CaseImpl submitted with the workflow engine has been
         * opened.
         */
        CASE_OPENED("CaseImpl Opened"),

        /**
         * Implies that the CaseImpl opened with the workflow engine has been
         * closed.
         */
        CASE_CLOSED("CaseImpl Closed");

        /**
         * Event type as String.
         */
        private String type;

        /**
         * @param type
         */
        private CaseEventType(String type) {
            this.type = type;
        }

        @Override
        public String asString() {
            return type;
        }
    }

    public CaseEvent(Case source, EventType type) {
        super(source, type);
    }

}
